﻿<div id="ModalOverlayWrapper" style="display: none;">
    <div class="ModalOverlayContent"></div>
    <div class="Icon RightCircle CloseIcon" style="width: 30px; height: 30px; position: absolute; right: 0; background-position:right center; display: none;"><a class="Icon Fill" href="javascript:ModalOverlay.Hide();"></a></div>
</div>

<script type="text/javascript">
    var ModalOverlay = new function () {
        var modalOverlayWrapperJq = $('#ModalOverlayWrapper');
        var closeIcon = modalOverlayWrapperJq.children(".CloseIcon");
        this.Show = function (content, showClose) {
            if (showClose) closeIcon.show();
            modalOverlayWrapperJq.children(".ModalOverlayContent").html(content);
            modalOverlayWrapperJq.show();
        };
        this.Hide = function () {
            modalOverlayWrapperJq.hide();
            closeIcon.hide();
            modalOverlayWrapperJq.children(".ModalOverlayContent").html('');
        };
    };
</script>